Skip to content

Conversation

@ethanndickson
Copy link
Member

Summary

Improves workspace deletion UX in the archived workspaces list:

  1. Spinner feedback: Replace trash icon with spinning loader while deletion is in progress
  2. Persist state across navigation: Expose isRemoving via the workspace list API so the spinner shows even after navigating away and back
  3. Idempotent deletion: Backend returns success (not error) if deletion is already in progress, preventing race conditions from double-clicks or concurrent tabs

Motivation

This PR is necessary for the Coder workspace integration, where workspace deletion can take 30+ seconds to several minutes due to remote API calls and cleanup operations. Without this change, users would see a briefly disabled button with no visual feedback, potentially leading to confusion or repeated delete attempts.

Changes

File Change
src/node/services/workspaceService.ts Add isRemoving() method, return Ok when already deleting, enrich list() with isRemoving
src/common/orpc/schemas/workspace.ts Add optional isRemoving field to FrontendWorkspaceMetadataSchema
src/browser/components/ArchivedWorkspaces.tsx Show Loader2 spinner when deleting, combine local + API state for isProcessing

Generated with mux • Model: anthropic:claude-opus-4-5 • Thinking: high • Cost: $6.28

- Show spinner instead of trash icon while deletion is in progress
- Expose isRemoving state via API so spinner persists across navigation
- Make deletion idempotent: return Ok if already deleting (prevents races)
- Add isRemoving field to FrontendWorkspaceMetadata schema
@ethanndickson ethanndickson added this pull request to the merge queue Jan 14, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 14, 2026
@ethanndickson ethanndickson added this pull request to the merge queue Jan 15, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 15, 2026
@ethanndickson ethanndickson added this pull request to the merge queue Jan 15, 2026
Merged via the queue into main with commit 976c32b Jan 15, 2026
22 checks passed
@ethanndickson ethanndickson deleted the workspace-deletion-0j2n branch January 15, 2026 01:59
ethanndickson added a commit that referenced this pull request Jan 15, 2026
)

## Summary

Improves workspace deletion UX in the archived workspaces list:

1. **Spinner feedback**: Replace trash icon with spinning loader while
deletion is in progress
2. **Persist state across navigation**: Expose `isRemoving` via the
workspace list API so the spinner shows even after navigating away and
back
3. **Idempotent deletion**: Backend returns success (not error) if
deletion is already in progress, preventing race conditions from
double-clicks or concurrent tabs

## Motivation

This PR is necessary for the Coder workspace integration, where
workspace deletion can take 30+ seconds to several minutes due to remote
API calls and cleanup operations. Without this change, users would see a
briefly disabled button with no visual feedback, potentially leading to
confusion or repeated delete attempts.

## Changes

| File | Change |
|------|--------|
| `src/node/services/workspaceService.ts` | Add `isRemoving()` method,
return `Ok` when already deleting, enrich `list()` with `isRemoving` |
| `src/common/orpc/schemas/workspace.ts` | Add optional `isRemoving`
field to `FrontendWorkspaceMetadataSchema` |
| `src/browser/components/ArchivedWorkspaces.tsx` | Show `Loader2`
spinner when deleting, combine local + API state for `isProcessing` |

---
_Generated with `mux` • Model: `anthropic:claude-opus-4-5` • Thinking:
`high` • Cost: `$6.28`_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant